package com.znufe.exam.viewmodel.admin.lecturer;

import com.znufe.exam.domain.Lecturer;
import com.znufe.exam.utility.DateTimeUtil;
import com.znufe.exam.viewmodel.BaseVM;
import lombok.Data;

import java.util.Date;

@Data
public class LecturerResponseVM  extends BaseVM {

    private Integer id;

    private String lecturerName;

    private Integer professionalTitle;

    private Integer gender;

    private String phone;

    private Integer status;

    private String gmtCreate;

    public static LecturerResponseVM from(Lecturer lecturer) {
        LecturerResponseVM vm = modelMapper.map(lecturer, LecturerResponseVM.class);
        vm.setGmtCreate(DateTimeUtil.dateFormat(lecturer.getGmtCreate()));
        return vm;
    }

}
